package com.abner.test;

/**
 * 懒汉式
 * @author abner
 */
public class Lazy {

    private Lazy() {}

    private static Lazy INSTANCE = new Lazy();

    public static Lazy init(Lazy INSTANCE) {
        if(INSTANCE == null) {
           synchronized (Lazy.class) {
               if(INSTANCE == null) {
                   return new Lazy();
               }
               return INSTANCE;
           }
        }

        return INSTANCE;
    }
}
